package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.domain.db.soul.SoulQuestion;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SoulQuestionMapper extends BaseMapper<SoulQuestion> {

    @Select("SELECT * FROM tb_soul_question WHERE soul_exam_id = #{examId}")
    List<SoulQuestion> findByLevel(Long examId);
    @Select("SELECT soul_exam_id FROM tb_soul_question WHERE id = #{questionId}")
    Long findExamIdByQuestionId(String questionId);

    @Select("SELECT soul_exam_id FROM tb_soul_question WHERE id = #{questionId}")
    int findExamId(Long questionId);
}
